// rfc
/*
  学习目标：
  了解: useState内部更新过程
  规范： const [变量名, set+驼峰变量名] = useState(初始值)
  掌握: useState推荐写法
 
*/
import React, { useState } from 'react';

export default function App() {
  const [count, setCount] = useState(83);
  const [msg, setMsg] = useState('hello React');

  return (
    <div>
      App
      <h1>{count}</h1>
      <button onClick={() => setCount(count + 1)}>点我+1</button>
      <hr />
      <h1>{msg}</h1>
      <button onClick={() => setMsg(msg + '~')}>点我+~</button>
    </div>
  );
}
